﻿<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="XMLViewer.XmlNodeDisplay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Grid>
        <StackPanel Name="MainStackPanel" HorizontalAlignment="Center">
            <Border Style="{StaticResource NodeElementBorder}" Cursor="Arrow" Margin="15, 7, 1, 1" >
                <StackPanel Orientation="Horizontal" Name="Name">
                    <TextBlock FontSize="14" FontWeight="Bold" Name="NodeName" Margin="2" Text="test"/>
                </StackPanel>
            </Border>
            <Border Style="{StaticResource NodeElementBorder}" Visibility="Collapsed" >
                <StackPanel Name="Attributes" Visibility="Collapsed" >
                    <TextBlock Text="Attributes" Margin="2" MouseLeftButtonUp="ShowNodeAttributes_MouseLeftButtonUp"/>
                    <data:DataGrid Name="NodeAttributes" Visibility="Collapsed" Margin="2" HeadersVisibility="None" >
                    </data:DataGrid>
                </StackPanel>
            </Border>
            <Border Style="{StaticResource NodeElementBorder}" Cursor="Arrow" Visibility="Collapsed">
                <StackPanel Name="Value" Visibility="Collapsed">
                    <TextBlock Text="Value:" Margin="2"/>
                    <TextBlock Name="NodeValue" />
                </StackPanel>
            </Border>
            <Border Style="{StaticResource NodeElementBorder}" Visibility="Collapsed">
                <StackPanel Name="Children" Visibility="Collapsed" >
                    <TextBlock Text="Children" Margin="2"  MouseLeftButtonUp="ShowNodeChildren_MouseLeftButtonUp"/>
                    <StackPanel Name="NodeChildren" HorizontalAlignment="Right" Visibility="Collapsed" Margin="2">
                        <StackPanel.Background>
                            <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                <GradientStop Color="#777777" Offset="0"/>
                                <GradientStop Color="#f5f5f5" Offset="1"/>
                            </LinearGradientBrush>
                        </StackPanel.Background>
                    </StackPanel>
                </StackPanel>
            </Border>
        </StackPanel>
    </Grid>
    
</UserControl>
